import request from '~/utils/resquest'

// 获取租户所有工区下拉列表
export const getWorkAreaSelectListByUser = () =>
  request({
    url: '/api/gxsaas-assets/workarea/selectList',
    method: 'get'
  })

// 新增工区
export const addWorkArea = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/workarea/add',
    method: 'post',
    data: params
  })

// 修改工区
export const updateWorkArea = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/workarea/update',
    method: 'post',
    data: params
  })

// 删除工区
export const delateWorkArea = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/workarea/remove',
    method: 'post',
    params
  })

// 获取行政区
export const getXzqData = () =>
  request({
    url: '/api/gxsaas-system/region/lazy-list',
    method: 'get'
  })

// 修改工区排列顺序
export const updateSortWorkArea = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/workarea/update-sort',
    method: 'post',
    params
  })

// 获取杆高类型
export const getLamppostClassify = () =>
  request({
    url: '/api/gxsaas-assets/lamppost/classify',
    method: 'get'
  })
